package com.pengxun.manager.enums;

public enum BlkCodeStatusEnum {
    ENABLE(0, "已解禁"),
    BLACK_LEVEL_1(1, "黑名单一级"),
    BLACK_LEVEL_2(2, "黑名单二级"),
    BLACK_LEVEL_3(3, "黑名单三级"),
    BLACK_LEVEL_4(4, "黑名单四级"),
    ;

    private Integer type;
    private String desc;

    private BlkCodeStatusEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static BlkCodeStatusEnum getEnumByType(Integer type){
        BlkCodeStatusEnum[] enums = BlkCodeStatusEnum.values();
        for (BlkCodeStatusEnum codeStatusEnum:enums){
            if(codeStatusEnum.getType() == type){
                return  codeStatusEnum;
            }
        }
        return  null;
    }

    public Integer getType() {
        return this.type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
